home *** CD-ROM | disk | FTP | other *** search
/ Mastering Web Site Development / Microsoft Mastering Web Site Development (Microsoft) (1997).iso / Media / Ch03 / W03D040.cc2 < prev    next >
Encoding:
Text File  |  1997-04-24  |  5.2 KB  |  95 lines

  1. 0, In this demonstration, you will see how to set up 
  2. 4, the State University database on Microsoft SQL 
  3. 7, Server 6.5 and Microsoft Access. To set up the 
  4. 11, database on Microsoft SQL Server, open the SQL Enterprise 
  5. 15, Manager, and connect to the SQL Server that you 
  6. 17, will install State University on. The first time you 
  7. 20, connect to your SQL Server, you will have to 
  8. 22, register it in the SQL Enterprise Manager by choosing 
  9. 25, Server, Register Server. In the Register Server 
  10. 30, dialog box, type in the name of your server, and type 
  11. 34, in a valid login and password for the server. 
  12. 39, Then click the Register button to register the server, 
  13. 42, and close the dialog box. The server will show up 
  14. 46, in the SQL Enterprise Manager. Expand it by 
  15. 49, clicking the plus sign next to the name. Next, you need 
  16. 56, to create a new database device for the State 
  17. 58, University database. Right-click on the database 
  18. 61, devices folder, and choose New Device. In the New 
  19. 66, Database Device dialog box, type in the name for the 
  20. 69, new database device, which is StateU, and set an 
  21. 74, initial size of 5MB. Choose Create Now to create 
  22. 79, the device. When the device is created, it will show 
  23. 84, up in the database devices folder as StateU. 
  24. 89, Next, you need to create a new database using the 
  25. 91, StateU device you just created. Right-click on the 
  26. 94, databases folder, and select New Database. In the 
  27. 99, New Database dialog box, type in the name of the 
  28. 101, database, which is StateU. Select the device of 
  29. 107, StateU, and set the size to 5MB, then click Create 
  30. 113, Now to create the database. When the database is 
  31. 117, created, it will show up in the databases folder. The 
  32. 127, initial database is empty, so now you must fill 
  33. 129, it with the tables and records that make up the 
  34. 132, State University database. The Mastering Web Site 
  35. 134, Development CD provides a SQL script file in the Lab 
  36. 138, 3 directory, which will install all of the State 
  37. 140, University data into the new database. To run the 
  38. 144, SQL script, select SQL Query Tool from the Tools 
  39. 147, menu. Then open the SQL file. The file name is 
  40. 157, stateu.sql. Once it's loaded, click the Play button. 
  41. 165, While the script executes, all of the tables, stored 
  42. 168, procedures, and data for State University are 
  43. 171, entered into the StateU database. When the Play 
  44. 174, button returns to a green color, the script is finished, 
  45. 177, and the State University database is ready for 
  46. 179, use. Now that State University is set-up on SQL 
  47. 185, Server, you will need to add an ODBC System DSN to any 
  48. 189, computers that will connect to the database. To 
  49. 192, do this, open the ODBC Data Source Administrator on 
  50. 196, the computer that will connect to State 
  51. 197, University. You can do this from the control panel. In the 
  52. 201, Data Source Administrator, click on the System DSN 
  53. 204, tab, then choose Add to add a new data source. 
  54. 209, Since this is a SQL Server database, choose SQL 
  55. 211, Server, and then click Finish. Then fill in all 
  56. 218, pertinent information about the StateU data source. I'll 
  57. 222, give it the same name as the database. I'll type 
  58. 225, in a description, type in the name of the server, 
  59. 236, and lastly, type in the name of the database by 
  60. 239, clicking on the Options button. When you're 
  61. 244, finished, click on the OK button, and the data source will 
  62. 247, be created. To set-up the Microsoft Access version 
  63. 254, of State University, all you have to do is share 
  64. 256, the State University database from a central file 
  65. 259, server. The Microsoft Access version of State 
  66. 262, University, stateu.mdb, is provided with the Mastering 
  67. 266, Web Site Development CD in the Lab 3 directory. 
  68. 269, Simply copy it to its own directory. I'll copy it 
  69. 272, to a directory called Database. Then share that 
  70. 277, directory out by right-clicking on it, and 
  71. 279, selecting Sharing. In the Sharing dialog box, I'll share 
  72. 287, this out as Database. Make sure that the file isn't 
  73. 294, marked as read-only by right-clicking on it, and 
  74. 296, choosing Properties. Now that the Microsoft Access 
  75. 308, version of State University is set up, you'll need 
  76. 311, to add an ODBC System DSN to any computers that 
  77. 314, will connect to the database. To do this, open the 
  78. 317, ODBC Data Source Administrator on the computer 
  79. 320, that will connect to State University. Go to the 
  80. 327, System DSN tab, and click on Add to add a new data 
  81. 330, source. Since this is a Microsoft Access database, 
  82. 334, select the Microsoft Access driver and click 
  83. 337, Finish. In the dialog box, fill in the data source name 
  84. 343, and description. Then you need to select the 
  85. 351, database over the network. Click on the Select button 
  86. 354, to do this. Then click on the Network button to 
  87. 359, establish the network connection, and type in the name 
  88. 362, of the server and the path name. Go to the server, 
  89. 374, and then select the stateu.mdb file, and click OK. 
  90. 379, Finally, click OK on the dialog box, and the 
  91. 382, System DSN is created. Now that you have set up State 
  92. 388, University on either SQL Server or Microsoft 
  93. 391, Access, you can create data-aware Web pages to work with 
  94. 395, the database.
  95. 396, END